# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=kdenetwork-kget
pkgver=17.08.1
pkgrel=1
pkgdesc='Download Manager'
url='https://kde.org/applications/internet/kget/'
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'FDL')
groups=('kde-applications' 'kdenetwork')
depends=('kdebase-runtime' 'libmms' 'qca-qt4')
makedepends=('cmake' 'automoc4' 'boost' 'libktorrent4')
optdepends=('libktorrent4: torrent support')
source=("https://download.kde.org/stable/applications/${pkgver}/src/kget-${pkgver}.tar.xz"{,.sig})
sha256sums=('81d92848e8be360561933a85eb9c13b1828a2c29ecfb7411a27739581a2c54a0'
            'SKIP')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid@kde.org>
              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87) # Christoph Feck <cfeck@kde.org>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../kget-${pkgver} \
    -DCMAKE_BUILD_TYPE=Release \
    -DKDE4_BUILD_TESTS=OFF \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DWITH_NepomukCore=OFF \
    -DWITH_NepomukWidgets=OFF \
    -DWITH_KDE4Workspace=OFF \
    -DWITH_QGpgme=OFF
  make
}

package() {
  cd build
  make DESTDIR=$pkgdir install
}
